package com.baitiaojun.moments.api;

import com.baitiaojun.api.domain.moments.UserDailyMoments;
import com.baitiaojun.api.vo.JsonRes;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @类名 DailyMomentsApi
 * @描述 TODO
 * @作者 白条君
 * @创建日期 2023/2/23 16:17
 * @版本 1.0
 */
@Api("日常动态接口")
@RequestMapping("/moments")
public interface DailyMomentsApi {

    @ApiOperation("上传图片列表")
    @PostMapping("/upload-moments-pictures")
    JsonRes uploadMomentsPictures(@RequestPart("files") MultipartFile[] files) throws Exception;

    @ApiOperation("获取动态图片列表")
    @GetMapping("/moments-pictures")
    void getMomentsPictures(@RequestParam String filePath, HttpServletResponse response) throws Exception;

    @ApiOperation("发布日常动态")
    @PostMapping("/publish-daily-moments")
    JsonRes publishDailyMoments(@RequestBody UserDailyMoments dailyMoments, BindingResult result) throws Exception;
}

